/**
 * 
 */

/**
 * @author Patrick
 *
 */
public class AndOp extends BooleanOp{
	public AndOp () {
		super("&&");
	}
	
	@Override
	public boolean isAndOp() { 
		return true;
	}
	
	@Override
	public STO calculate(ConstSTO left, ConstSTO right) {
		boolean b = left.getBoolValue() && right.getBoolValue();
		String s;
		if(b == true) {
			s = "1";
		} else {
			s = "0";
		}
		ConstSTO sto;
		sto = new ConstSTO((left.getName() + "&&" + right.getName()), new BoolType(), s);
		return sto;
	}
}
